<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.0.0-beta3/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>

<div class="container">
    <div class="title" style="margin: 0 auto; padding-left: 450px;">
        <h1>Searching Result</h1>
    </div>
    <table class="table">
        <thead class="thead-dark">
        <tr>
            <th scope="col">ID</th>
            <th scope="col">Name</th>
            <th scope="col">Type</th>
            <th scope="col">State</th>
            <th scope="col">From</th>
            <th scope="col">To</th>

        </tr>
        </thead>
        <tbody>
        {% for p in c_page %}
            <tr>
                <th scope="p">{{ p.ID }}</th>
                <td>{{ p.Name }}</td>
                <td>{{ p.Type }}</td>
                <td>{{ p.State }}</td>
                <td>{{ p.From }}</td>
                <td>{{ p.To }}</td>
            </tr>
        {% endfor %}

        </tbody>

    </table>

    <div>
        <nav aria-label="Page navigation example">
            <ul class="pagination">
                {% if c_page.has_previous %}
                    <li class="page-item"><a class="page-link"
                                             href="/customer/serachResult?search={{ text }}&page={{ c_page.previous_page_number }}">Previous</a>
                    </li>
                {% else %}
                    <li class="page-item"><a class="page-link">Previous</a></li>
                {% endif %}


                {% for p_num in paginator.page_range %}
                    {% if p_num == c_page.number %}
                        <li class="page-item"><a class="page-link">{{ p_num }}</a></li>
                    {% else %}
                        <li class="page-item"><a class="page-link"
                                                 href="/customer/serachResult?search={{ text }}&page={{ p_num }}">{{ p_num }}</a>
                        </li>
                    {% endif %}
                {% endfor %}


                {% if c_page.has_next %}
                    <li class="page-item"><a class="page-link"
                                             href="/customer/serachResult?search={{ text }}&page={{ c_page.next_page_number }}">Next</a>
                    </li>
                {% else %}
                    <li class="page-item"><a class="page-link">Next</a></li>
                {% endif %}
            </ul>
        </nav>
    </div>


</div>

</body>
</html>